package com.itheima.dao;


import com.itheima.domain.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author Mr.Shen
 * @date 2020-02-13 19:10
 */
public interface IUserDao {
    @Select("select * from user")
    List<User> findAll();
    @Select("select * from user where id = #{id}")
    User findById(Integer id);
    @Update("update user set username = #{username},password=#{password},age=#{age},sex=#{sex},email=#{email} where id = #{id} ")
    void updateUser(User user);
}
